#ifndef FESCALELAYOUT_PRIVATE_H
#define FESCALELAYOUT_PRIVATE_H
#include "fecore_global.h"
#include <QLayout>
#include <QRect>
#include <QSize>
#include <QWidgetItem>

class FeScaleLayout: public QLayout
{
public:
	FeScaleLayout(const QSize &baseSize);
	FeScaleLayout(const QSize &baseSize, QWidget *parent);
	~FeScaleLayout();

	void addItem(QLayoutItem *item);
    void addWidget(QWidget *widget, const QRect &rect);
	Qt::Orientations expandingDirections() const;
    bool hasHeightForWidth() const;
	int count() const;
	QSize minimumSize() const;
    void setGeometry(const QRect &rect);
    QSize sizeHint() const;
    QLayoutItem *itemAt(int index) const;
	QLayoutItem *takeAt(int index);

	void add(QLayoutItem *item, const QRect &rect);

private:
	struct ItemWrapper
    {
		ItemWrapper(QLayoutItem *i, const QRect &r) {
			item = i;
			rect = r;
		}
	QLayoutItem *item;
	QRect rect;
    };

	QSize baseSize;
	QList<ItemWrapper *> list;
};


#endif